package zuoye3;

import java.util.Scanner;

public class commodityTest {
    public static void main(String[] args){
        System.out.println("********欢迎进入商品批发城********");
        System.out.println("\t编号\t商品\t价格");
        int num[] = new int[]{1,2,3,4,5};
        String commodity[] = new String[]{"电风扇","洗衣机","电视剧","冰箱 ","空调机"};
        double price[] = new double[]{124.23,4500.0,8800.9,5000.88,4456.0};
        for(int i=0;i<5;i++){
            System.out.print("\t"+num[i]);
            System.out.print("\t"+commodity[i]);
            System.out.print("\t"+price[i]+"\n");
        }
        Scanner sc = new Scanner(System.in);
        System.out.print("请输入您批发的商品编号：");
        int newNum = sc.nextInt();
        System.out.print("请输入批发数量：");
        int number = sc.nextInt();
        double sum=0;
        switch(newNum) {
            case 1:
                sum = number * 124.23;
                System.out.println("您需要付款：" + sum);
                break;
            case 2:
                sum = number * 4500.0;
                System.out.println("您需要付款：" + sum);
                break;
            case 3:
                sum = number * 8800.9;
                System.out.println("您需要付款：" + sum);
                break;
            case 4:
                sum = number * 5000.88;
                System.out.println("您需要付款：" + sum);
                break;
            case 5:
                sum = number * 4456.0;
                System.out.println("您需要付款：" + sum);
                break;
        }
    }

}
